<?php
 include_once('../db.php');    
		if (isset($_POST['submit'])) {
			$db=new DB();
		$id=$_POST['id'];
		$title = $_POST['title'];
		$menu = $_POST['menu'];
		$status =$_POST['status'];
		$content= htmlspecialchars($_POST['content'],ENT_QUOTES,'utf-8');
		$time= time();
			$sql="update article set title='$title',menu='$menu',status='$status',content='$content',create_time='$time' where id=$id";
			if ($db->update($sql)) {
				header("location:article_manage.php");
			}else{
				exit("修改失败");
			}
		}
	?>